<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.flying.dcss.viewmodel.impl.OrderListViewModel"%>
<%@page import="com.flying.dcss.app.SessionName"%>
<%@page import="com.flying.dcss.app.CommonHelper"%>

<%
	List<OrderListViewModel> models = (List<OrderListViewModel>) request
			.getAttribute(SessionName.OrderListSession);

	if (models == null)
		return;
%>

<tr class="first">
	<td>
		城市
	</td>
	<td>
		建筑
	</td>
	<td>
		楼层
	</td>
	<td>
		门禁
	</td>
	<td>
		理由
	</td>
	<td>
		期限
	</td>
	<td>
		申请人
	</td>
	<td>
		申请人工号
	</td>
	<td>
		授权人
	</td>
	<td>
		状态
	</td>
	<td>
		操作
	</td>
</tr>
<%
	for (OrderListViewModel item : models) {
%>
<tr>
	<td>
		<%=item.getCity()%>
	</td>
	<td>
		<%=item.getBuilding()%>
	</td>
	<td>
		<%=item.getFloor()%>
	</td>
	<td>
		<%=item.getDcInfo().getDescription()%>
	</td>
	<td>
		<%=item.getOrder().getReason()%>
	</td>
	<td>
		<%=CommonHelper.getShortDate(item.getOrder()
						.getDeadline())%>
	</td>
	<td>
		<%=item.getUserInfo().getRealName()%>
	</td>
	<td>
		<%=item.getUserInfo().getEmpoyeeNum()%>
	</td>
	<td>
		<%=item.getApproverInfo().getRealName()%>
	</td>
	<td>
		<%=CommonHelper.showApplicationState(item.getOrder()
						.getState())%>
	</td>
	<td>
		<a href="javascript:void(0);"
			onclick="passOrder('<%=item.getOrder().getId()%>');refreshOrder();return false;"><img
				src="images/icon_approve.png" alt="通过" /></a>

		<a href="javascript:void(0);"
			onclick="rejectionOrder('<%=item.getOrder().getId()%>');refreshOrder();return false;"><img
				src="images/icon_unapprove.png" alt="拒绝" /></a>
	</td>
</tr>
<%
	}
%>